package com.cloud.quickconfigure.rabbitmq;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
 * Rabbit配置
 */
@Data
@Configuration
public class RabbitProperties {
    /**
     * Rabbit地址
     */
    @Value("${spring.rabbitmq.host}")
    private String host;

    /**
     * 端口
     */
    @Value("${spring.rabbitmq.port}")
    private int port;

    /**
     * 登陆用户名
     */
    @Value("${spring.rabbitmq.username}")
    private String login;

    /**
     * 密码
     */
    @Value("${spring.rabbitmq.password}")
    private String password;

    /**
     * 虚拟地址
     */
    @Value("${spring.rabbitmq.virtual-host}")
    private String vhost;

    /**
     * 消息达到交换机
     * */
    @Value("${spring.rabbitmq.publisher-confirms}")
    private boolean isConfirm;

    /**
     * 交换机到队列
     * */
    @Value("${spring.rabbitmq.publisher-returns}")
    private boolean isReturns;
}
